// 01.引入sequelize
let  { Sequelize}  = require('sequelize')
//02 建立连接数据库链接
var connect = new Sequelize("cars","cars","cars",{
    host:'119.29.244.175',
    dialect:"mysql",
    port:'3306',
    timezone: '+08:00',//北京时间格式化-东八区
    // 添加这个配置 ,时间格式化
    dialectOptions: {
        dateStrings: true,
        typeCast: true
    }
})
//03关闭连接
// connect.end()
//04 导出
module.exports = {
    connect
}


